home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / picbot20.zip / PICBOOT.MAN < prev    next >
Text File  |  1994-03-29  |  19KB  |  501 lines

  1.  
  2.  
  3.    This file describes PicBoot, version 2.0, a program to show an IFF
  4. ILBM or GIF picture during boot.
  5.  
  6. Introduction
  7. ************
  8.  
  9.    Have you removed all output in your 2.0+ startup, and only see a
  10. black screen during boot? Wouldn't it be nice to have a picture
  11. instead? A picture that disappeared when the Workbench screen opened?
  12.  
  13.    If so, PicBoot is certainly a program for you. What it will do is
  14. to read any IFF file containing an ILBM picture - or a GIF file - and
  15. show that picture. As soon as the Workbench screen appears (or you press
  16. any mouse-button), the picture will go away.
  17.  
  18.    Features:
  19.  
  20.    *  Fast picture unpacking, using highly optimized assembler. The
  21.      entire picture is read into memory and then unpacked. This applies
  22.      both to the IFF and the GIF unpacker.
  23.  
  24.    *  Optional auto-detaching; the picture is loaded as fast as
  25.      possible, with minimal memory fragmentation.
  26.  
  27.    *  Random select among any number of pictures.
  28.  
  29.    *  Force a certain display mode for a picture, even if saved with
  30.      another (can be selected on a picture by picture basis, if you are
  31.      using a LIST file (see LIST).
  32.  
  33.    *  Optional screen centering (horisontally).
  34.  
  35. System requirements
  36. *******************
  37.  
  38.    Apart from OS 2.04+, PicBoot doesn't require any special
  39. libraries. The only non-ROM library required is iffparse.library
  40. (which normally resides in Libs:).
  41.  
  42. Legal information
  43. *****************
  44.  
  45.    This program is freeware. You may copy and use this program freely,
  46. as long as the following conditions are met:
  47.  
  48.    *  All files are copied in an unmodified state. If additional
  49.      information is needed, place it in a separate file. Preferably
  50.      redistribute in the original archive form (*.Lha).
  51.  
  52.    *  The copying is done on a non-commercial and non-profit basis
  53.      only. A copy fee to cover media costs, postage etc. may be
  54.      charged. This fee may not exceed the fee to obtain an AmigaLibDisk
  55.      from Fred Fish.
  56.  
  57.    *  The copier/spreader is not claiming the Copyright ⌐ of this
  58.      program.
  59.  
  60.    Any exceptions from these restrictions requires written permission
  61. from the author, Magnus Holmgren.
  62.  
  63. Disclaimer
  64. ==========
  65.  
  66.    Magnus Holmgren neither assume nor accept any responsibility for the
  67. use or misuse of these programs. He also will not be held liable for
  68. damages or any compensation due to loss of profit or any other damages
  69. arising out of the use, or inability to use these programs.
  70.  
  71.    Magnus Holmgren will not be liable for any damage arising from the
  72. failure of these programs to perform as described, or any destruction
  73. of other programs or data residing on a system attempting to run the
  74. programs. While he know of no damaging errors, the user of these
  75. programs uses it at his or her own risk.
  76.  
  77. Usage
  78. *****
  79.  
  80.    To activate PicBoot, add a line to your S:Startup-Sequence,
  81. looking something like this:
  82.  
  83.      PicBoot Pics:Hi-res/Calvin01.Pic DETACH
  84.  
  85. Or, if you have a list of files in "Work:Text/PicList":
  86.  
  87.      PicBoot Work:Text/PicList LIST DETACH
  88.  
  89.    This line should be located near the beginning in the
  90. S:Startup-Sequence (no point in placing it near the LoadWB
  91. command, is it? :), but keep it after SetPatchPicBoot will only
  92. output any text if it fails, so don't re-direct its output. Note however
  93. that if you place PicBoot before any additional monitors are
  94. installed, you'll be stuck with the default.monitor for showing your
  95. picture.  The DEFAULT switch may be of help here.
  96.  
  97.    Make sure no program makes any output in the CLI window, since then
  98. the Workbench screen will open with a boring CLI-window instead...
  99.  
  100.    Options:
  101.  
  102. FILES
  103. =====
  104.  
  105.    This is the only required argument. Here you specify the name of the
  106. picture you want to view. You may enter several files here, in which
  107. case PicBoot will select one of them randomly, and show that one. It
  108. may also be the name of an ASCII file containing a filename list if you
  109. specified the LIST option (see LIST).
  110.  
  111.        Note: The random-number generator used is quite simple, and is
  112. based on the current system time. I don't know if it is a "good" random
  113. generator.  It seems to be enough random for me at least.. :) If you
  114. have an algorithm you think is better, don't be afraid to send it to
  115. me. It should be fairly small.. :)
  116.  
  117. MODEID
  118. ======
  119.  
  120.    Short form: M
  121.  
  122.    NOTE: This argument is mainly for the more "advanced" user.
  123.  
  124.    This argument should be a decimal number specifying which
  125. displaymode to use.  It basically replaces the so called CAMG hunk in
  126. an ILBM file.  Thus, you must select mode with care, or else the
  127. picture will look like trash (nothing more serious can happen. I hope!
  128. :). When showing GIF files, it will override the internal "best mode"
  129. routines (which aren't good at all. But I haven't bothered to add code
  130. to make them better.. :).
  131.  
  132.    To make it easier for you to find out which display mode id to use,
  133. there is a small program called GetModeID included, which uses the
  134. ReqTools or Asl screenmode requester. Simply select the display
  135. mode you want. See GetModeID.
  136.  
  137.    The mode id will be passed through the same validity checking as a
  138. normal so called CAMG chunk, so PicBoot should handle bad values
  139. properly (although I haven't tested this much.. :).
  140.  
  141. LIST
  142. ====
  143.  
  144.    Short form: L
  145.  
  146.    If this switch is specified, PicBoot will interpret the files in
  147. the FILES argument as names of files containing a list of pictures (or
  148. rather, argument lines). PicBoot will then randomly select one of the
  149. lines in the selected file, and process it almost like a normal
  150. argument line. The only difference is that you can't use the DETACH
  151. argument. This argument may not be specified in a listfile (no point in
  152. doing it anyway).
  153.  
  154.    The filelist file is an ASCII (text) file with a simple layout. On
  155. the first line you specify the number of argument lines in the file.
  156. This is usually <number of lines in file>-2 (one line is occupied by
  157. the count, and the other is the last linefeed). The rest of the file is
  158. simply the argument lines to choose from.
  159.  
  160.      4
  161.      Work:Pics/Comics/Calvin01.Pic CENTER ON
  162.      Work:Pics/Comics/Calvin02.Pic MODEID 137220
  163.      Work:Pics/Comics/Calvin03.Gif
  164.      Work:Text/MoreCalvins.txt LIST CENTER ON
  165.  
  166.    The first file will be centered (regardless of what the command line
  167. said).
  168.  
  169.    The second file have a display mode id added to it. This particular
  170. id tells PicBoot to use the PAL monitor, with a low-res interlace HAM
  171. screen. If no id is specified, PicBoot will use the MODEID specified
  172. in any previous "listfile line", the CLI-arguments, or the contents of
  173. the CAMG chunk/"best mode" (in that order).
  174.  
  175.    The last example line is another list file, which PicBoot will
  176. load and process. Centering will be on as default for all files in this
  177. list.
  178.  
  179.    Note that any arguments specified from the CLI, or in any previous
  180. listfile, will be taken as the new default value. In the listfile you
  181. may alter this default. This does not include the LIST argument
  182. (ofcourse). It is always turned off before parsing a line.
  183.  
  184.        Warning: Since you may enter a new listfile within a listfile,
  185. you can be caught in an endless loop, constantly changing (maybe to the
  186. same) listfile. No checking for this is done. Also, since there is no
  187. CLI-window around, you have no chance to send PicBoot any CTRL-c, if
  188. PicBoot should happen to listen to this. You have been warned! :)
  189.  
  190.        Note: A line in a listfile may not be more than 510 chars, or
  191. it will be truncated when read. This shouldn't cause any problems I
  192. think..
  193.  
  194. DETACH
  195. ======
  196.  
  197.    Short form: D
  198.  
  199.    If this switch is specified, PicBoot will detach from its calling
  200. CLI when the picture is fully loaded and displayed. If you specify this
  201. option, you shouldn't "Run" PicBoot. This option will reduce memory
  202. fragmentation, and will ensure that the picture gets loaded quickly.
  203. However, the implementation maybe isn't the most "system-friendly" one
  204. (but there aren't that many alternatives), hence the switch. I don't
  205. think there will be any problems, but one can never know... :)
  206.  
  207. CENTER
  208. ======
  209.  
  210.    Short form: C
  211.  
  212.    Possible arguments: YES, ON, NO, OFF. Default is NO.
  213.  
  214.    If this switch is on (argument is YES or ON), PicBoot will center
  215. the picture. This centering should work fine for most screen modes, but
  216. one can never now.. :) If a screen promotor is active, then
  217. PicBoot can get it wrong (when the screen is opened in another
  218. mode than PicBoot had asked for).
  219.  
  220. DEFAULT
  221. =======
  222.  
  223.    Short form: DEF
  224.  
  225.    Possible arguments: YES, ON, NO, OFF. Default is NO.
  226.  
  227.    If this switch is on (argument is YES or ON), PicBoot will force
  228. the picture to use the default.monitor, regardless of what was actually
  229. stored in the picture (in the CAMG chunk). This is needed since very
  230. early in the startup, default.monitor is the only monitor available
  231. (e.g.  multiscan.monitor is normally not available). In the future, I
  232. might add more types of "forcing" (e.g. force a picture to PAL, NTSC or
  233. whatever that might be useful).
  234.  
  235.    This switch also acts on the MODEID parameter, if specified.
  236.  
  237. AUTOSCROLL
  238. ==========
  239.  
  240.    Short form: AS
  241.  
  242.    Possible arguments: YES, ON, NO, OFF. Default is NO.
  243.  
  244.    If this switch is on (argument is YES or ON), the OS 2.0+
  245. autoscrolling of screens will be enabled.
  246.  
  247.        Note: During boot, this switch may make the actual display a
  248. bit smaller than normally possible. There is nothing I can do about
  249. that... :) You can, however, by ensuring that ENV: is properly set up
  250. before PicBoot is started. Or you could try the VIDEOOVERSCAN switch
  251. (see VIDEOOVERSCAN).
  252.  
  253. VIDEOOVERSCAN
  254. =============
  255.  
  256.    Short form: VO
  257.  
  258.    Possible arguments: YES, ON, NO, OFF. Default is NO.
  259.  
  260.    If this switch is on (argument is YES or ON), the visible size of
  261. the opened screen will be as large as the system can handle. Forces
  262. AUTOSCROLL to YES.
  263.  
  264. Known problems
  265. **************
  266.  
  267.    I do not know of any real bugs in PicBoot. However, certain parts
  268. of the program may still contain bugs. E.g.,  pictures that have a mask
  269. bitplane (mskHasMask) are supported, but since I only have one
  270. (compressed) picture that have a mask, there might be a bug in that
  271. code (can't test it properly).  Please report any problems!
  272.  
  273.    Currently there is no support for SHAM, PCHG and similar "special"
  274. pictures. I'm not sure if this could be implemented in a "clean" way
  275. (that would work on future systems etc). These pictures aren't that
  276. common, and I have an Amiga with AA-graphics, so... :) Color cycling is
  277. currently ignored (I have no need for it).
  278.  
  279.    Interlaced GIF pictures aren't supported, since I don't have any such
  280. picture. Besides, the decompression of such pictures would be slower
  281. anyway.
  282.  
  283.        PicBoot doesn't remap GIF files in any way. Even if you have
  284. ECS, GIF files can still be useful. This is because a GIF file can have
  285. from 2 to 256 colors (inclusive). Thus, if you have a program that can
  286. save a 32-color picture as a 32-color GIF file, there will be no
  287. problem to view it with PicBoot.
  288.  
  289.    The "best mode" routine used in the GIF reader isn't good at all
  290. (this includes the ROM function in OS 3.0+! :).
  291.  
  292.    Pictures with more than 8 bitplanes are currently not supported by
  293. PicBoot.
  294.  
  295.    The centering for (some?) Super72 screens doesn't work. I suspect
  296. this is an OS-bug (I know that PicBoot calculates a reasonable
  297. offset, which Intuition seems to ignore).
  298.  
  299. GetModeID
  300. *********
  301.  
  302.        GetModeID is a simle program that shows a Asl or
  303. ReqTools screenmode requester, whichever is available. The program
  304. will then print out the decimal identifier for the selected screenmode,
  305. suitable for use together with the MODEID parameter. This program can
  306. only be used from a Shell. Example usage:
  307.  
  308.        PicBoot Island.Gif `GetModeID`
  309.  
  310.    This will first show a screenmode requester (if you have one, that
  311. is), and then show the GIF-picture in the selected screenmode.
  312.  
  313. UnpackILBM
  314. **********
  315.  
  316.        UnpackILBM is another simple program (at least in theory...
  317. :). It will take any IFF ILBM picture and unpack the so called BODY
  318. chunk in it (this is the actual image data). This means that e.g.
  319. PicBoot will be able to display that image a little faster, at
  320. least if loading them from some fast media. Or, if you use
  321. PPShow/ShowIFF, you could repack the picture with
  322. PowerPacker/Xpk, to maximize the compression (as the
  323. compression used in IFF ILBM isn't a very efficient one. But on the
  324. other hand, it is rather fast). But then PicBoot won't be able to
  325. load them.. :) Example usage:
  326.  
  327.        UnpackILBM Island.Pic Island.Pic.NoComp
  328.        UnpackILBM Island.Pic
  329.  
  330.    The first example till unpack the picture to a new one, while the
  331. other will - via a temprary file - overwrite the original picture with
  332. the uncompressed version.
  333.  
  334.    I wrote this program since someone (I've forgot who) wanted it... :)
  335.  
  336.        Note: I haven't tested this program that much. I've
  337. converted a few pictures, so it seems to work fine (at least when there
  338. aren't any errors), but one can never now.. Please report any problems!
  339.  
  340.        Note: This program doesn't strip any information. All chunks
  341. will remain. The picture data is only decompressed.
  342.  
  343. Author contact
  344. **************
  345.  
  346.        PicBoot was written in 100% assembler by Magnus Holmgren. If
  347. you have any comments etc, feel free to send me a note. You can reach
  348. me via internet on this address:
  349.  
  350.      cmh@augs.se
  351.  
  352.    Fido-net messages should go to "Magnus Holmgren",
  353. 2:204/404.6@fidonet.org.  Snail mail should reach me if you write the
  354. following address on the envelope:
  355.  
  356.      Magnus Holmgren
  357.      RydsvΣgen 254  A:14
  358.      S-582 51  Link÷ping
  359.      SWEDEN
  360.  
  361. Version history
  362. ***************
  363.  
  364. Version 1.00
  365. ============
  366.  
  367.    Release date: 08 Feb 93
  368.  
  369.    *  Initial release.
  370.  
  371. Version 1.01
  372. ============
  373.  
  374.    Release date: 14 Feb 93
  375.  
  376.    *  PicBoot would sometimes read past the end of the picture-list
  377.      file, although the file was correct. Also, the last picture would
  378.      never be showed.  Fixed (thanks to Daniel Joseph Oak for
  379.      reporting).
  380.  
  381.    *  Did some tweeking, to make the program smaller. The total gain
  382.      was eaten up by improved error messages though. PicBoot will now
  383.      more accurately report why the display didn't open.
  384.  
  385.    *  Added support for masked ILBMs, since I discovered that I had
  386.      such a picture anyway. :) Since I only have one picture, its hard
  387.      to tell if it really works, but it seems to be ok at least.
  388.  
  389.    *  The autoscrolling of the screen didn't work. Fixed (so now you
  390.      can view pictures larger than the screen, by moving the invisible
  391.      mouse-pointer).
  392.  
  393.    *  Added the CENTER switch.
  394.  
  395. Version 1.02
  396. ============
  397.  
  398.    Release date: 21 Feb 93
  399.  
  400.    *  Added the DEFAULT switch. As Bradley Yen pointed out for me,
  401.      there is (normally) only one monitor available early in the
  402.      startup, and that is default.monitor (and what default.monitor is
  403.      can vary. It can e.g. be PAL or NTSC). This switch will make the
  404.      picture use the default.monitor, regardless what it was saved in.
  405.  
  406.    *  Autoscrolling of screen disabled again, since this would make some
  407.      overscanned pictures clipped, even if this wasn't needed.
  408.  
  409.    *  A bug in the init code fixed.
  410.  
  411. Version 1.03
  412. ============
  413.  
  414.      Release date: 15 Oct 93
  415.  
  416.    *  If an error occured, any black "cover screen" (BLACK option)
  417.      wasn't closed.  Fixed.
  418.  
  419.    *  "Ported" to Macro68. At the same time, the code was cleaned up a
  420.      little. All this saved more than 100 bytes from the program. Most
  421.      of it eaten up by the improvements though.. :)
  422.  
  423.    *  Added the MODEID parameter. rtGetModeID is included to make the
  424.      use of this parameter easier.
  425.  
  426.    *  Docs rewritten using Texinfo.
  427.  
  428.    *  Pictures with mskHasMask were reported to have an "error in
  429.      compressed BODY chunk", due to a bug. Sorry, but I don't have many
  430.      pictures to test this code with.. :)
  431.  
  432.    *  AUTOSCROLL switch added, so that you can scroll around in large
  433.      pictures.  Mostly useful when PicBoot is used from the Shell.
  434.      During boot, this can cause the picture to be clipped when it
  435.      isn't necessary.
  436.  
  437.    *  PicBoot will now move the screen to the back before closing it
  438.      (this makes the closing faster). Not needed during boot, but... :)
  439.  
  440.    *  List files much improved! Each line will be parsed almost like
  441.      the normal arguments. Old files should work fine, as long as no
  442.      filename contains spaces, in which case those lines need to be
  443.      quoted.
  444.  
  445.    *  Altered command line syntax slightly. Needed because of the new
  446.      listfile format. Tech note: I'm using a poorly documented feature
  447.      of AmigaDOS: The /T specifier. If the argument following the
  448.      keyword is YES or ON, the switch is turned on, if it is OFF or NO,
  449.      the switch is off. Any other arguments causes an error. Testing
  450.      revealed the true nature of this specifier... :)
  451.  
  452.    *  Removed the "You need OS 2.04+" error message. An (Exec) Alert
  453.      will be shown instead.
  454.  
  455.    *  PicBoot will now random-select among the FILES arguments, even
  456.      if the LIST argument have been used (previously, only the first
  457.      file was used).
  458.  
  459.    *  VIDEOOVERSCAN switch added. Makes the visible area as large as
  460.      the system can handle. Requested by Stefan Boberg.
  461.  
  462.    *  Screen centering improved. Should work fine with any screen mode
  463.      now (but if you promote the screen, PicBoot will probably get it
  464.      wrong. Unless the promotor also "promotes" QueryOverscan() :).
  465.  
  466. Version 2.0
  467. ===========
  468.  
  469.    Release date: 29 Mar 94
  470.  
  471.    *  BLACK argument removed. Not needed any more, since PicBoot now
  472.      will first allocate the needed memory, decode the picture into
  473.      this memory, and then open the screen. This makes the screen
  474.      opening/closing a little faster too (practically instaneous on my
  475.      A4000/040).
  476.  
  477.    *  Pictures (or rather, brushes) that were less than 16 pixels wide
  478.      wouldn't decompress properly... :)
  479.  
  480.    *  Added support for the CMAPOK flag in the BitMapHeader.bmh_Flags
  481.      (previously called bmh_Pad) field (if this flag is set it
  482.      indicates that the color map contains 8 bits/color rather than 4
  483.      bits/color).
  484.  
  485.    *  Major code cleanup. Made the program somewhat larger, but... :)
  486.  
  487.    *  GIF support added. Should be a little faster than PPShow.. :)
  488.  
  489.    *  The MODEID argument wasn't properly "passed on" to any following
  490.      listfile(s).
  491.  
  492.    *  Rewrote rtGetModeID into GetModeID, that first checks for
  493.      Asl, and then tries with ReqTools before giving up. This new
  494.      version is in C, compiled with DICE, without any startup code, and
  495.      is fully residentable. :)
  496.  
  497.    *  Included UnpackILBM, that takes any IFF ILBM file (with a BODY
  498.      chunk, i.e. a normal picture) and writes it with an uncompressed
  499.      BODY instead. Written upon user request..
  500.  
  501.